package com.ruoyi.slope.human.surfaceMonitor.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.human.surfaceMonitor.mapper.SlopeHumanMonitoredSurfaceMapper;
import com.ruoyi.slope.human.surfaceMonitor.domain.SlopeHumanMonitoredSurface;
import com.ruoyi.slope.human.surfaceMonitor.service.ISlopeHumanMonitoredSurfaceService;

/**
 * 边坡地位移Service业务层处理
 * 
 * @author psy
 * @date 2025-04-27
 */
@Service
public class SlopeHumanMonitoredSurfaceServiceImpl implements ISlopeHumanMonitoredSurfaceService 
{
    @Autowired
    private SlopeHumanMonitoredSurfaceMapper slopeHumanMonitoredSurfaceMapper;

    /**
     * 查询边坡地位移
     * 
     * @param id 边坡地位移主键
     * @return 边坡地位移
     */
    @Override
    public SlopeHumanMonitoredSurface selectSlopeHumanMonitoredSurfaceById(Long id)
    {
        return slopeHumanMonitoredSurfaceMapper.selectSlopeHumanMonitoredSurfaceById(id);
    }

    /**
     * 查询边坡地位移列表
     * 
     * @param slopeHumanMonitoredSurface 边坡地位移
     * @return 边坡地位移
     */
    @DataScope(deptAlias = "s")
    @Override
    public List<SlopeHumanMonitoredSurface> selectSlopeHumanMonitoredSurfaceList(SlopeHumanMonitoredSurface slopeHumanMonitoredSurface)
    {
        return slopeHumanMonitoredSurfaceMapper.selectSlopeHumanMonitoredSurfaceList(slopeHumanMonitoredSurface);
    }

    /**
     * 新增边坡地位移
     * 
     * @param slopeHumanMonitoredSurface 边坡地位移
     * @return 结果
     */
    @Override
    public int insertSlopeHumanMonitoredSurface(SlopeHumanMonitoredSurface slopeHumanMonitoredSurface)
    {
        slopeHumanMonitoredSurface.setCreateTime(DateUtils.getNowDate());
        return slopeHumanMonitoredSurfaceMapper.insertSlopeHumanMonitoredSurface(slopeHumanMonitoredSurface);
    }

    /**
     * 修改边坡地位移
     * 
     * @param slopeHumanMonitoredSurface 边坡地位移
     * @return 结果
     */
    @Override
    public int updateSlopeHumanMonitoredSurface(SlopeHumanMonitoredSurface slopeHumanMonitoredSurface)
    {
        slopeHumanMonitoredSurface.setUpdateTime(DateUtils.getNowDate());
        return slopeHumanMonitoredSurfaceMapper.updateSlopeHumanMonitoredSurface(slopeHumanMonitoredSurface);
    }

    /**
     * 批量删除边坡地位移
     * 
     * @param ids 需要删除的边坡地位移主键
     * @return 结果
     */
    @Override
    public int deleteSlopeHumanMonitoredSurfaceByIds(Long[] ids)
    {
        return slopeHumanMonitoredSurfaceMapper.deleteSlopeHumanMonitoredSurfaceByIds(ids);
    }

    /**
     * 删除边坡地位移信息
     * 
     * @param id 边坡地位移主键
     * @return 结果
     */
    @Override
    public int deleteSlopeHumanMonitoredSurfaceById(Long id)
    {
        return slopeHumanMonitoredSurfaceMapper.deleteSlopeHumanMonitoredSurfaceById(id);
    }
}
